home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
tex
/
blurb_20.zip
/
BLURB.DOC
< prev
next >
Wrap
Text File
|
1992-04-28
|
10KB
|
199 lines
===============================================================================
BLURB
Version 2.0
4/28/92
===============================================================================
Copyright(c) 1992, Jon Privatt, All Rights Reserved
-------------------------------------------------------------------------------
What this Blurb thing, anyway?
-----------------------------
Blurb is a program that chooses a random line from a file and prints it on
the screen in a decent manner. The file of blurbs can be jokes, fortunes,
quotes, philosophical sayings, or whatever you want.
The problem:
-----------
For quite some time I have been searching for a decent program that would
print sayings on my screen in a decent manner from my autoexec.bat file.
I wanted a program that would read a normal ASCII text file that I could
change very easily. I found a couple, but they were either too clumsy or used
files which could not be easily altered. Grief and frustration finally kicked
in and motivated me and the original Blurb 1.0 was born! It is a sad, but
workable program which was crammed out in less than 1 hour in compilable BASIC.
It is reliable and small but has its flaws. I had installed it on couple of
friends' systems and they agreed, Blurb 1.0 was an interesting program.
However, as time went on and they added more and more blurbs to the list, it
began to manifest it's major flaw...speed. It was taking an average of 30 sec.
to choose a blurb from a list of 2000. In order to salvage what was left of
our friendship, I removed the Blurb 1.0 from their system, logged their various
complaints and suggestions and headed back to the drawing board.
The Solution - Blurb 2.0:
------------------------
My goal was a program that was non-obtrusive, easy-to-use, and still be
intelligent enough to detect differences in user preferences and system
configurations and work around them. My goal was to rewrite the entire program
in C++ which would give me greater control over the system file access than a
BASIC programming language could. At the same time, I wanted to make the
program smart enough to detect changes in various file configurations and deal
with them automatically. My speed goal was a blurb off the harddrive from a
list of 5000 in no more than two seconds, even on the slowest of systems.
Blurb 2.0 meets these standards (and then some)!
Features:
--------
* Main program and setup contained in a single file.
* Indexed blurb file for very fast access.
* File structure is of non-uniform record sizes (saves a lot of disk space).
* Auto-adaptation to most screen widths.
* User definable colors.
* Optional borders.
* Program name & author title line may be optionally hidden.
* Optional delay after printing blurb to screen.
* Delay is variable depending on number of words in a given blurb and the
user selected time to pause per each word.
* Delay can be instantly bypassed by the user by pressing a key.
* Program automatically finds and places .idx and .cfg files.
* No need for continuous command-line options as they're saved in .cfg file.
* Program automatically detects changes in the file BLURBS and reindexes.
* User may optionally view blurbs in a sequential or random order.
* System ignores blank lines in blurb file.
How Fast is Fast?
----------------
Blurb 2.0 surpasses the benchmark test of 300,000 blurbs (occupying 14.5 meg)
by choosing a blurb in under 1 second when running on my slow SCSI hard drive.
In fact, performance is consistent on all systems I have tested Blurb 2.0 on,
regardless of whether there are 10, 5000, or 300,000 blurbs! Blurb 2.0 has
theoretical limitations approaching 4.3 billion blurbs and blurb file sizes
of over 2.1 gigabytes with a maximum individual blurb size of 1000 characters.
Blurb Installation:
------------------
Installation is a simple matter. Only two files are required, BLURB.EXE and
BLURBS. The former is the program, and the latter contains the actual blurbs.
Just make sure that these two files are located somewhere in the system PATH.
Packing List:
Blurb.exe The main program.
Blurb.doc This file your are reading now.
Blurbs A small collection of fortunes to get you started.
The first time you run the program, it will reindex itself. This is normal
and will only occur when the program senses that the file BLURBS has been
changed in some way. (Reindexing may take some time as the number of blurbs
increases, but it is a necessary and infrequent step in achieving high-speed
file access. The amount of time required to re-index should give you a pretty
good idea how slow Blurb version 1.0 was.)
After it is finished reindexing, Blurb reports how many blurbs there are
and then it halts. Blurb is now ready for normal operation. All you have to
do to use it is to run it again.
Using Blurb:
-----------
When the program runs, it automatically finds and places the two support
files that it requires, BLURB.CFG (the configuration file) and BLURB.IDX (the
index file to the blurbs themselves). If any update has occurred to the file,
BLURBS, the program will automatically detect the change and reindex the file.
Various command-line options:
Blurb This is the normal command that will be used to operate
the program.
Blurb ? This will print out a summary of these commands.
Blurb /setup Calls the set-up menu which will update the configuration
file (BLURB.CFG).
Blurb /info Prints out various information about the program's
current status.
Blurb /index Forces a manual reindex of the file BLURBS. This is
usually detected automatically, but the option is here.
Blurb /delay Overrides delay option in setup menu and uses a delay
after displaying a blurb.
Blurb /nodelay Overrides delay option in setup menu and does not use
a delay after displaying the blurb.
Setup Options:
-------------
<A>uto Time Delay Selects and deselects whether or not there is a pause
after the blurb has been selected. Default: OFF
<D>elay When the Auto Time Delay is on, this is the delay that
is used. The total delay is equal to this delay
multiplied by the number of words that in the blurb.
This value is in 100th's of a second. Default: 50
<B>ackground Color This options cycles through the possible background
colors. Results of color changes will be seen
instantly in the menu. Default: Blue
<F>oreground Color Cycles through all of the possible foreground colors.
(Same as <B>ackground Colors) Default: Bright White
<H>ide the Title Makes the top line author, title and version number
either visible or masked. Default: VISIBLE
<O>utlining Border Selects and deselects the border which appears around
the blurb. Default: ON
<S>election Method Allows the user to decide whether to see blurbs in a
RANDOMIZED order, or see the blurbs in a INORDER
sequential order. Default: RANDOMIZED
Where Can I Find More Blurbs?
----------------------------
I have enclosed a few blurbs with the original packaging in order to hold you
over until you begin collecting the sort of things you really want to see
coming up on your screen. The most common place to find these things is on
BBS systems, usually in the text file download areas. There are a great deal
of them out there concerning a variety of different subjects. All